package br.ufpe.cin.imlm2.util.options;

import java.util.List;
import java.util.Map;

public interface IOptions {

	public abstract void parse(Map<String, String> options)
			throws NoSuchOptionException;

	/**
	 * Returns a list with all the possible names of valid (declared) options.
	 * 
	 * @return
	 */
	public abstract List<String> getDeclaredOptions();

	/**
	 * Returns the string representation of the value for the option with name
	 * <code>optName</code>. The string representation must generate an
	 * equivalent value as if it were to be parsed by the
	 * <code>parse(Map<String,String>)</code> method.
	 * 
	 * @param optName
	 *            Option name
	 * @return
	 * @throws NoSuchOptionException
	 *             In case an option with <code>optName</code> doesn't exist.
	 */
	public abstract String getOptionValue(String optName)
			throws NoSuchOptionException;

	/**
	 * Returns an alias for an option with name <code>name</code>. Returns
	 * <code>name</code> if there is no alias for an option with this name. If
	 * an option with name <code>name</code> doesn't exist returns null.
	 * 
	 * @param name
	 * @return
	 */
	public abstract String getAlias(String name);

	/**
	 * Returns the help message associated with an option with name
	 * <code>optName</code>. Returns <code>null</code> in case there isn't an
	 * option with name <code>optName</code>.
	 * 
	 * @param optName
	 * @return
	 */
	public abstract String getHelp(String optName);

	public abstract List<Option> getOptions();

	public abstract boolean addOption(Option op);

}